<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <cpn></cpn>
    <cpn><span slot="left">标题</span></cpn>
    <cpn><span slot="left">标题</span> <button slot="right">按钮</button></cpn>

</div>
<template id="cpn">
    <div>
        <slot name="left"><span>左边插槽</span></slot>
        <slot name="center"><span>中间插槽</span></slot>
        <slot name="right"><span>右边插槽</span></slot>
    </div>
</template>
<script src="../js/vue.js"></script>
<script>
    const aaa = new Vue({
        el: "#app",
        data: {
            message: "hello,guys",
        },
        components: {
            'cpn': {
                template: "#cpn",
            }
        }
    })
</script>
</body>
</html>